As disclosed in Japanese Patent Application Laid-open No. 2008-235405 (hereinafter referred to as Patent document 1), Ti is generally used as a material of an electrode in ohmic contact with a GaN layer. Generally, the electrode is formed by forming a Ti layer on the GaN layer and then heat-treating a semiconductor substrate. By the heat treatment of the semiconductor substrate, a TiN layer is formed between the Ti layer and the GaN layer. The TiN layer shows a good ohmic property on the GaN layer. Thus, the Ti layer serves as an ohmic electrode on the GaN layer.